<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	UserBean user = (UserBean) request.getSession().getAttribute(
			"userBean");

	Map<String, List<Map<String, String>>> dicMap = user.getDicMap();
	List<Map<String, String>> list = null;

	String _db = user.getDbType();
	String tbe_nation = "";//民族

	list = null;
	list = dicMap.get("5");
	if (null != list && list.size() > 0) {
		for (Map<String, String> map : list) {
			tbe_nation += "<option value=\"" + map.get("tmgd_id")
					+ "\">" + map.get("tmgd_name") + "</option>";
		}
	}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link type="text/css" rel="stylesheet"
			href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet"
			href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet"
			href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />

		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/validata.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerTree.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerForm.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerDateEditor.js"></script>

		<script type="text/javascript">
var _db = '<%=_db%>';
//引用json对象，兼容IE8
//if(typeof JSON == 'undefined'){
//$('head').append($("<script type='text/javascript' src='js/json2.js'>"));
//}
_jsonObj.classname = "com.wxtf.platform.main.sygl.pregnancy_recordAction";
_jsonObj.methodname = "";
_jsonObj.logicdata = "[]";

var _jsonObje = {
	"classname":"com.wxtf.platform.main.sygl.pregnancy_recordAction",
	"methodname":"listAll",
	"logicdata":"[{\"tbe_name\":\"\",\"tbe_idcard\":\"\"}]"
};

var _jsonDetail = {
	"classname":"com.wxtf.platform.main.sygl.pregnancy_recordAction",
	"methodname":"selectDetail",
	"logicdata":"[{\"orgIds\":\"\",\"tbe_work_permit\":\"\",\"tbenm_plan_status\":\"\"\"type\":\"\"\"tbe_is_late_birth\":\"\"\"tbe_spell_code\":\"\"\"tbepr_ptime\":\"\"}]"
};
var win;//新建/修改弹出框
var win2;//家庭弹出框
var win3;//弹出框

var manager;//人员表格

$(function(){
	manager = $("#emp-grid").ligerGrid({
		url: _url, parms: _jsonObj, width: '100%',height:'100%',heightDiff:-60,
		usePager: true, rownumbers: true, checkbox: true, alternatingRow: true,onAfterShowData: function(data, currentPageData)
		 {
		 	//allProps(data);
		     $("#pregnancying").val(data.pregnancying);
		     $("#pregnancyed").val(data.pregnancyed);
		     $("#pregnancy").val(data.pregnancy);
		     $("#plan").val(data.plan);
		     $("#plan1").val(data.plan1);
		     $("#plan2").val(data.plan2);
		     $("#late").val(data.late);
		 },
		columns: [
			{ display: 'tbfi_id', name: 'tbfi_id', hide: true,width:1 },
			{ display: 'org_id', name: 'org_id', hide: true,width:1 },
			{ display: 'tbe_id', name: 'tbe_id', hide: true,width:1 },
			{ display: 'tbepr_id', name: 'tbepr_id',hide: true,width:1},
			{
				display: '怀孕时间', name: 'tbepr_ptime', width: 150, align: 'left',
				render:function(row)
				{
					var html='';
					var time=row.tbepr_ptime;
					return html='<font color="red">'+time+'</font>'
				}
			},
			{ display: '员工名称', name: 'tbe_name', width: 150, align: 'left',render: function(record, index, value, oth){
					return " <a href='javascript:addData(" + JSON.stringify(record) + ")'>"+value+"</a>";
				}
			},
            { display: '机构名称', name: 'reserve1', width: 150, align: 'left'},
			{ display: '员工身份证号', name: 'tbe_idcard', width: 160, align: 'left' },
			{ display: 'tbe_sex', name: 'tbe_sex',width:1, hide:true},
			{ display: 'tbe_birthday', name: 'tbe_birthday',width:1, hide:true},
			{ display: 'tbe_nation', name: 'tbe_nation',width:1, hide:true},
			{ display: 'ftbfi_phone', name: 'ftbfi_phone', width:  1, hide:true },
			{ display: 'tbfi_address', name: 'tbfi_address', width:  1, hide:true },
			{ display: '配偶姓名', name: 'tbfi_peo_num',width:1, hide:true},
			{ display: '家庭子女数', name: 'tbfi_children_num',width:1, hide:true},
			{ display: '家庭男孩数', name: 'tbfi_children_mnum', width: 80, align: 'left' },
			{ display: '家庭女孩数', name: 'tbfi_children_fnum', width: 80, align: 'left' },
			{
                  display: '怀孕登记状态', name: 'tbepr_option', width: 150, align: 'left',
                  render: function (row)
                  {
                     var html = '';
                     if(row.tbepr_option=='0'){
                     		html = '怀孕';              
                     }else if(row.tbepr_option=='1'){
                     		html = '等孕'; 
                     }
                     else if(row.tbepr_option=='2'){
                     		html = '无';
                     }
                     return html;
                  }
            },
			{ display: 'tbenm_id', name: 'tbenm_id', hide: true,width:1 },
			{
                display: '计划状态登记项', name: 'tbenm_plan_status', width: 150, align: 'left',
                render: function (row)
                {
                   var html = '';
                   if(row.tbenm_plan_status=='0'){
                   		html = '计划内一胎';
                   }else if(row.tbenm_plan_status=='1'){
                   		html = '计划内二胎';
                   }
                   return html;
                }
            },
			{ display: '胎次', name: 'tbenm_gravida_times', hide: true,width:1  },
			{ display: '胎数', name: 'tbenm_gravida_num', hide: true,width:1  },
			{ display: '出生时间', name: 'tbenm_birth_time',width: 150, align: 'left' },
			{display: '晚婚+晚育', name: 'tbe_is_late_birth',width:  1, hide:true},
			{ display: '备注', name: 'tbepr_memo', width:  1, hide:true },
			{ display: '备注', name: 'tbenm_memo', width:  1, hide:true },
			{ display: '新生婴儿男孩数', name: 'reserve2', width:  1, hide:true },
			{ display: '新生婴儿女孩数', name: 'reserve3', width:  1, hide:true },
			{ display: '晚婚+晚育', name: 'reserve4',width: 100, align: 'left' ,
			   render: function (row)
                    {
                       var html = '';
                       if(row.reserve4=='1'){
                       		html = '是';
                       }
                       else if(row.reserve4=='0'){
                       		html = '否';
                       }
                       else{html=''}
                       return html;
                   }
            },
			{ display: 'reserve5', name: 'reserve5', width:  1, hide:true},
			{ display: '录入人', name: 'create_by', width:  1, hide:true },
			{ display: '录入时间', name: 'create_time', width:  1, hide:true },
			{ display: '最后修改人', name: 'last_modify_by', width:  1, hide:true },
			{ display: '最后修改时间', name: 'last_modify_time', width: 1, hide:true },
			{ display: '编辑', isSort:false, name:'edit',width:60,render: function(record, index, value, oth){
					return "<img src='ligerUI/skins/icons/edit.gif' onclick='addData(" + JSON.stringify(record) + ")'></img>";
				}
			}
		],
		toolbar: {
			items: [
				{ text: '登记', click: function(){ addData(); }, icon: 'add' },
				{ line: true },
				{ text: '删除', click: function(){ delData(); },icon: 'delete'}
			]
		}
		
	});

	
	/*
	 * 日期框
	 */
	$("#tbepr_ptime").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
	$("#tbenm_birth_time").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
	$("#tbe_birthday").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
	$("#ser2").ligerDateEditor({ format: "yyyy-MM-dd", width:164});
});

/*
 * 表格刷新
 */
function reload(){
	_jsonObj.methodname = "queryPage";
	_jsonObj.logicdata = "[{\"types\":\"init\"}]";
	manager.loadData();
}

/*
 * ajax成功回调
 */
function ajaxCallbackSuccFunc(data, textStatus){
	if(win){
		//win.hide();
	}
	serch1();
	if(data.result || data.result == 'true'){
		var result=data.resultrecord.split(':');
		if(result.length>1)
		{
		 	if(result[1].substring(0,3)=="pre")
		 	{
		 		$('#tbepr_id').val(result[1].substr(3));
		 	}
		 	if(result[1].substring(0,3)=="neo")
		 	{
		 		$("#tbenm_id").val(result[1].substr(3).split('|')[0]);
		 		$('#tbepr_id').val(result[1].substr(3).split('|')[1]);
		 	}
	
		}
		succMsgTip(result[0]);
	}else{
		warningTip(data.resultrecord);
	}
}

function ajaxCallbackSuccFunc1(data, textStatus){
	serch1();
	if(data.result || data.result == 'true'){
		var result=data.resultrecord.split(':');
		if(result.length>1)
		{
		 	if(result[1].substring(0,3)=="pre")
		 	{
		 		$('#tbepr_id').val(result[1].substr(3));
		 	}
		 	if(result[1].substring(0,3)=="neo")
		 	{
		 		$("#tbenm_id").val(result[1].substr(3).split('|')[0]);
		 		$('#tbepr_id').val(result[1].substr(3).split('|')[1]);
		 	}
	
		}
		succMsgTip(result[0]);
	}else{
		warningTip(data.resultrecord);
	}

	if(win && data.result){
		win.hide();
	}
	if(win2){
		win2.hide();
	}

}

/*
 * ajax失败回调
 */
function ajaxCallbackErrorFunc(data, textStatus){
	warningTip(data.resultrecord);
}

/*
 * 获取列表选中的人员ID
 */
function getUserIds(){
	var arrayUsers = manager.getSelecteds();
	if(arrayUsers.length == 0){
		return "";
	} else {
		var text = "";
		for(var i=0; i<arrayUsers.length; i++){
			text += arrayUsers[i].tbepr_id + ":tbepr_id" + ",";
			text += arrayUsers[i].tbenm_id + ":tbenm_id" + ",";
			text += arrayUsers[i].tbend_id + ":tbend_id" + ",";
		}
		return text.substring(0, text.length - 1);
	}
}


/*
 * 新建弹出框
 */
function openEmp(){
	_jsonObje.logicdata = '[{\"tbe_name\":\"\",\"tbe_idcard\":\"\"}]';
	
	if(win2==null){
		win2 = initWindowByDiv('grid0-win', '选择人员', 650, 360, function(item, dialog){
			var row = grid0.getSelecteds();
			if(row.length != 1){
				warningTip('请选择一个用户');
				return;
			}
			$('#org_id').val(row[0].org_id);
			$('#tbfi_ids').val(row[0].tbfi_id);
			$('#tbe_name').val(row[0].tbe_name);
			$('#tbe_birthday').val(row[0].tbe_birthday);
			$("input[name='tbe_sex'][value='" + row[0].tbe_sex + "']").attr("checked", true);
			$('#tbe_idcard').val(row[0].tbe_idcard);
			$('#tbe_nation').val(row[0].tbe_nation);
			$('#tbfi_children_num').val(row[0].tbfi_children_num);
			$('#tbfi_phone').val(row[0].tbfi_phone);
			$('#tbfi_address').val(row[0].tbfi_address);
			$('#tbfi_peo_num').val(row[0].tbfi_peo_num);
			$('#tbfi_children_mnum').val(row[0].tbfi_children_mnum);
			$('#tbfi_children_fnum').val(row[0].tbfi_children_fnum);
			//单选框设置值
			//$("input[name='reserve4'][value='" + row[0].tbe_is_late_birth + "']").attr("checked", true);
			$('#tbe_id').val(row[0].tbe_id);
			win2.hide();
		}, closeWin);
		grid0 = $("#grid0-div").ligerGrid({
			url:_url, parms:_jsonObje, width: 620, height: 250,
			usePager: true, rownumbers: true, checkbox: true, alternatingRow: true,
			columns: [
				{ display: 'tbfi_id', name: 'tbfi_id', hide: true,width:1 },
				{ display: 'org_id', name: 'org_id', hide: true,width:1 },
				{ display: '机构名称', name: 'reserve1',align: 'left',width:150},
				{ display: '姓名', name: 'tbe_name', width: 100, align: 'left' },
				{ display: '员工id', name: 'tbe_id',width:1, hide:true},
				{ display: '婚姻状态', name: 'tbe_marital_status',width:1, hide:true},
				{ display: '身份证号码', name: 'tbe_idcard', width: 160, align: 'left' },
				{ display: '性别', name: 'tbe_sex', width: 100, align: 'left' },
				{ display: '出生日期', name: 'tbe_birthday',width: 150, align: 'left'},
				{ display: '民族', name: 'tbe_nation', width: 100, align: 'left'},
				{ display: '家庭电话', name: 'tbfi_phone',width: 100, align: 'left' },
				{ display: '家庭地址', name: 'tbfi_address',width: 100, align: 'left' },
				{ display: '配偶姓名', name: 'tbfi_peo_num',width: 100, align: 'left' },
				{ display: '家庭子女数', name: 'tbfi_children_num',width: 100, align: 'left' },
				{ display: '男孩数', name: 'tbfi_children_mnum',width: 60, align: 'left' },
				{ display: '女孩数', name: 'tbfi_children_fnum',width: 60, align: 'left' },
				{ display: '晚婚+晚育', name: 'tbe_is_late_birth',width:1, hide:true}
			],
			onCheckRow: function(checked, rowdata, rowindex) {
			    for (var rowid in this.records)
			        this.unselect(rowid); 
			    this.select(rowindex);
			}
		});
	} else {
		win2.show();
		grid0.loadData();
	}
	serempReset();
}

/*显示明细*/
function showDetail(title,type){
	var orgIds = $('#org2').val();
	var tbe_work_permit = $('#ser3').val();//身份证号
	var tbe_spell_code = $('#ser1').val();//姓名
	var tbepr_ptime = $('#ser2').val();
	var tbenm_plan_status = $('#ser4').val();
	var tbe_is_late_birth = $('#ser5').val();
	
	_jsonDetail.logicdata = '[{\"orgIds\":\"' + orgIds + '\",\"tbe_work_permit\":\"' + tbe_work_permit + '\",\"tbenm_plan_status\":\"' + tbenm_plan_status
			 + '\",\"type\":\"' + type+ '\",\"tbe_is_late_birth\":\"' + tbe_is_late_birth + '\",\"tbe_spell_code\":\"' + tbe_spell_code + '\",\"tbepr_ptime\":\"' + tbepr_ptime +'\"}]';

	initWindowByDiv2('mdiv',title+"明细", 800, 350,closeWin);
	if(win3==null){
	dgrid = $("#dgrid").ligerGrid({
		url: _url,parms: _jsonDetail, width: 775, height: 280,
		usePager: true,rownumbers: true,alternatingRow: true,
		columns: [
			{ display: 'tbe_id', name: 'tbe_id', hide: true,width:1 },
			{ display: 'org_id', name: 'org_id', hide: true,width:1 },
			{ display: '机构名称', name: 'reserve1', width:150, align:'left' },
			{ display: '职工证号', name: 'tbe_work_permit',width: 1, hide:true},
			{ display: '姓名', name: 'tbe_name', width: 100, align: 'left' },
			{ display: '性别', name: 'tbe_sex', width: 60, align: 'left' },
			{ display: '年龄', name: 'tbe_age', width: 1, hide:true},
			{ display: '出生日期', name: 'tbe_birthday', width: 100, align: 'left' },
			{ display: '身份证号', name: 'tbe_idcard', width: 180, align: 'left' },
			{ display: '配偶姓名', name: 'tbfi_spouse_name',width: 100, align: 'left'},
			{ display: '配偶年龄', name: 'tbfi_spouse_age',width: 1, hide:true},
			{ display: '配偶性别', name: 'tbfi_spouse_sex',width: 100, align: 'left'},
			{ display: '配偶出生日期', name: 'tbfi_spouse_birthday',width: 100, align: 'left'},
			{ display: '配偶身份证号', name: 'tbfi_spouse_idcard',width: 100, align: 'left'},
			{ display: '配偶所属单位', name: 'tbfi_spouse_department',width: 100, align: 'left'},
			{ display: '配偶职务', name: 'tbfi_spouse_position',width: 100, align: 'left'},
			{ display: '籍贯', name: 'tbe_native_palce', width: 1, hide:true },
			{ display: '家庭电话', name: 'tbe_family_phone', width: 100, align: 'left' },
			{ display: '家庭住址', name: 'tbe_address', width: 250, align: 'left' },
			{ display: '家庭人数', name: 'tbfi_peo_num',width: 100, align: 'left' },
			{ display: '家庭子女数', name: 'tbfi_children_num',width: 100, align: 'left'  },
			{ display: '男孩数', name: 'tbfi_children_mnum',width: 100, align: 'left'  },
			{ display: '女孩数', name: 'tbfi_children_fnum',width: 100, align: 'left' },
			{ display: '婚姻状况', name: 'tbe_marital_condition', width: 1, hide:true },
			{ display: '是否允许再生育', name: 'tbe_is_again_birth',width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '是否不孕症（绝经）', name: 'tbe_is_barrenness', width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '是否晚婚', name: 'tbe_is_late_marriage',width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '是否晚育', name: 'tbe_is_late_birth', width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '配偶员工id', name: 'tbe_spouse_id', width:  1, hide:true },
			{ display: '配偶是否一汽员工', name: 'tbfi_spouse_is_join', width:  1, hide:true },
			{ display: '家庭电话', name: 'tbfi_phone', width:  1, hide:true },
			{ display: '紧急联系电话', name: 'tbfi_mobile', width:  1, hide:true },
			{ display: 'tbepr_option', name: 'tbepr_option', width:  1, hide:true },
			{ display: 'tbenm_plan_status', name: 'tbenm_plan_status', width:  1, hide:true },
			{ display: 'reserve4', name: 'reserve4', width:  1, hide:true },
			{ display: 'reserve5', name: 'reserve5', width:  1, hide:true }
		]
	});
	} else {
		win3.show();
		dgrid.loadData();
	}
}

/*
 * 新增/修改人员
 */
function addData(row){
	document.getElementById('emp-form').reset();
	document.getElementById('emp-form1').reset();
	document.getElementById("empBtn").disabled = false;//使可用
	$("#tbepr_id").val('');
	document.getElementById('emp-form2').reset();
	$("#tbenm_id").val('');
	
	if(row){
		loadForm("emp-form", row);
		loadForm("emp-form1", row);
		loadForm("emp-form2", row);
		document.getElementById("empBtn").disabled = true;//使不可用
		
		var reserve2 = $("#reserve2").val().trim();
		var reserve3 = $("#reserve3").val().trim();
		$("#tbfi_children_mnums").val(reserve2);
		$("#tbfi_children_fnums").val(reserve3);
	} else {
		
	}

	if(win == null){
		win = initWindowByDiv2('empAdd-div', '编辑信息', 650, 500 ,closeWin);
	}else{
		win.show();
	}
}

function precon(id)
{
	var tbe_name = $("#tbe_name").val().trim();
	var mnum = $("#tbfi_children_mnum").val().trim();
	var fnum = $("#tbfi_children_fnum").val().trim();
	var tbepr_memo = $("#tbepr_memo").val().trim();
	if('' == tbe_name){warningTip("姓名：不能为空"); return;}
	if(!checkIsString(tbe_name)){
		warningTip("姓名：必须为字母、数字、下划线、中文组成");
		return;
	}
	if(fucCheckLength(tbe_name) > 32){
		warningTip("姓名：不能超过32字符");
		return;
	}

	if(!isNum(mnum, '+')){
		warningTip("男孩数：请输入正整数");
		return;
	}
	if(!isNum(fnum, '+')){
		warningTip("女孩数：请输入正整数");
		return;
	}
	if(!checkIsString(tbepr_memo)){
		warningTip("备注：必须为字母、数字、下划线、中文组成");
		return;
	}
	if(fucCheckLength(tbepr_memo) > 512){
		warningTip("备注：不能超过512字符");
		return;
	}
	var time = $('#tbepr_ptime').val();
	if(time=='')
	{
		warningTip('怀等孕时间：不能为空');
		return;
	}else
	{
		var res = compareDate('1963-01-01',time);
		if(null == res || res > 0){
			warningTip('怀等孕时间不能早于1963年');
			return;
		}
	}
	document.getElementById("empBtn").disabled = true;//使不可用
	var text = document.getElementById('org_id');
	text = text.options[text.selectedIndex].text.replaceAll('-','');
	$('#reserve1').val(text);
	var tbfi_ids = $('#tbfi_ids').val();
	var tbepr_id = $("#tbepr_id").val();

	var tbe_id = $('#tbe_id').val();
	_jsonObj.logicdata = getForm("emp-form1").substring(0,getForm("emp-form1").length-2)+ ',\"tbfi_children_fnums\":\"' +fnum+'\",\"tbfi_children_mnums\":\"' + mnum+ '\",\"reserve2\":\"\",\"reserve3\":\"\",\"reserve4\":\"\",\"tbfi_ids\":\"' + tbfi_ids +'\",\"tbe_id\":\"' + tbe_id +'\"}]';
	if(tbepr_id == ''){
		if(id){
		}else
		{
			_jsonObj.methodname = "save";
			callserver(_jsonObj, ajaxCallbackSuccFunc, ajaxCallbackErrorFunc);
		}
	} else {
		if(id){
			$('#tbepr_option').val(2);//让登记状态下拉框显示为：无
			_jsonObj.methodname = "updateOption";//注销
			callserver(_jsonObj, ajaxCallbackSuccFunc, ajaxCallbackErrorFunc);
		}
		else
		{
			_jsonObj.methodname = "update";//修改
			callserver(_jsonObj, ajaxCallbackSuccFunc, ajaxCallbackErrorFunc);
		}
	}
}

function neofun(id)
{
	var tbe_name = $("#tbe_name").val().trim();
	var mnum = $("#tbfi_children_mnum").val().trim();
	var fnum = $("#tbfi_children_fnum").val().trim();
	var reserve2 = $("#reserve2").val().trim();
	var reserve3 = $("#reserve3").val().trim();
	var tbenm_memo = $("#tbenm_memo").val().trim();
	if('' == tbe_name){warningTip("姓名：不能为空"); return;}
	if(!checkIsString(tbe_name)){
		warningTip("姓名：必须为字母、数字、下划线、中文组成");
		return;
	}
	if(fucCheckLength(tbe_name) > 32){
		warningTip("姓名：不能超过32字符");
		return;
	}
	if(!isNum(mnum, '+')){
		warningTip("男孩数：请输入正整数");
		return;
	}
	if(!isNum(fnum, '+')){
		warningTip("女孩数：请输入正整数");
		return;
	}
	if(!isNum(reserve2, '+')){
		warningTip("新生男孩数：请输入正整数");
		return;
	}
	if(!isNum(reserve3, '+')){
		warningTip("新生女孩数：请输入正整数");
		return;
	}
	if(!checkIsString(tbenm_memo)){
		warningTip("备注：必须为字母、数字、下划线、中文组成");
		return;
	}
	if(fucCheckLength(tbenm_memo) > 512){
		warningTip("备注：不能超过512字符");
		return;
	}
	var time = $('#tbenm_birth_time').val();
	if(time=='')
	{
		warningTip("新生儿出生日期：不能为空");
		return;
	}
	var res = compareDate('1963-01-01',time);
	if(null == res || res > 0){
		warningTip('新生儿出生日期不能早于1963年');
		return;
	}
	document.getElementById("empBtn").disabled = true;//使不可用
	check();
	var t = $("#tbenm_plan_status").val();
	$("#tbenm_gravida_times").val(parseInt(t)+1);
	var text = document.getElementById('org_id');
	text = text.options[text.selectedIndex].text.replaceAll('-','');
	$('#reserve1').val(text);
	var tbfi_ids = $('#tbfi_ids').val();
	var tbepr_id = $("#tbepr_id").val();
	var tbenm_id = $("#tbenm_id").val();
	var tbe_id = $('#tbe_id').val();
	_jsonObj.logicdata = getForm("emp-form2").substring(0,getForm("emp-form2").length-2)+ ',\"tbepr_id\":\"' + tbepr_id+ '\",\"tbfi_children_fnum\":\"' + fnum+'\",\"tbfi_children_mnum\":\"' + mnum+ '\",\"tbfi_ids\":\"' + tbfi_ids +'\"}]';
	if(tbenm_id == ''){
		_jsonObj.methodname = "saveneo";
		callserver(_jsonObj, ajaxCallbackSuccFunc1, ajaxCallbackErrorFunc);
	} else {
		if(id){
			_jsonObj.methodname = "updateOptionneo";//注销新生儿
			$("#tbenm_id").val('');//使之注销之后可以重新不断添加
			callserver(_jsonObj, ajaxCallbackSuccFunc1, ajaxCallbackErrorFunc);
		}
		else
		{
			_jsonObj.methodname = "updateneo";//修改
			callserver(_jsonObj, ajaxCallbackSuccFunc1, ajaxCallbackErrorFunc);
		}
	}
}

///晚婚+晚育验证
function check()
{
	var plan = $('#tbenm_plan_status').val();
	if(plan=='1')
	{
		var wan=$('input[name="reserve4"]:checked').val();
		if(wan=='1')
		{
			warningTip('计划内二胎不能设置为晚婚+晚育');
			$("input[name='reserve4'][value='0']").attr("checked", true);
			return;
		}
	}
} 
    
/*
 * 删除人员
 */
function delData(){
	var userIds = getUserIds();
	if(userIds == ""){
		warningTip('请至少选择一个用户进行操作');
		return;
	}
	$.ligerDialog.confirm('确定要删除选中的数据吗？（删除不可恢复）', function (opt) { 			
		if(opt){
			_jsonObj.methodname = "delete";
			_jsonObj.logicdata = "[{\"ids\":\"" + userIds + "\"}]";
			callserver(_jsonObj, ajaxCallbackSuccFunc, ajaxCallbackErrorFunc);
		}
	});
}

/*
 * 条件导出查询
 */
function expData(){
	var orgIds = $('#org2').val();
	var tbe_work_permit = $('#ser3').val();//身份证号
	var tbe_spell_code = $('#ser1').val();//姓名
	var tbepr_ptime = $('#ser2').val();//怀孕时间
	var tbenm_plan_status = $('#ser4').val();//计划状态
	var tbe_is_late_birth = $('#ser5').val();//晚婚+晚育
	
	_jsonObj.methodname = "expData";
	_jsonObj.logicdata = '[{\"orgIds\":\"' + orgIds + '\",\"tbe_work_permit\":\"' + tbe_work_permit + '\",\"tbenm_plan_status\":\"' + tbenm_plan_status
			 + '\",\"tbe_is_late_birth\":\"' + tbe_is_late_birth + '\",\"tbe_spell_code\":\"' + tbe_spell_code + '\",\"tbepr_ptime\":\"' + tbepr_ptime +'\"}]';
	
	callserver(_jsonObj, function(data, textStatus){
		if(data.result){
			downloadFile(data.resultrecord);
		} else {
			warningTip(data.resultrecord);
		}
	}, function(data, textStatus){
	});
}


/*
 * 重置-条件查询
 */
function serReset(){
	$('#ser1').val('');
	$('#ser3').val('');
	$('#ser2').val('');
	$('#ser4').val('');
	$('#ser5').val('');
}

/*
 * 条件查询
 */
function serch1(){
	var orgIds = $('#org2').val();
	var tbe_work_permit = $('#ser3').val();//身份证号
	var tbe_spell_code = $('#ser1').val();//姓名
	var tbepr_ptime = $('#ser2').val();
	var tbenm_plan_status = $('#ser4').val();
	var tbe_is_late_birth = $('#ser5').val();

	_jsonObj.methodname = "queryPage";
	_jsonObj.logicdata = '[{\"orgIds\":\"' + orgIds + '\",\"tbe_work_permit\":\"' + tbe_work_permit + '\",\"tbe_is_late_birth\":\"' + tbe_is_late_birth
			+ '\",\"tbe_spell_code\":\"' + tbe_spell_code + '\",\"tbepr_ptime\":\"' + tbepr_ptime + '\",\"tbenm_plan_status\":\"' + tbenm_plan_status
			 +  '\",\"types\":\"serch1\"}]';
	manager.loadData();
}

function serempReset()
{
	$('#ser-name').val('');
	$('#ser-no').val('');
}

/*
 * 选人弹出框-条件查询
 */
function serch2(){
	var tbe_name = $('#ser-name').val().trim();
	var ser_no = $('#ser-no').val().trim();
	_jsonObje.logicdata = '[{\"tbe_name\":\"' + tbe_name + '\",\"tbe_idcard\":\"' + ser_no + '\"}]'
	grid0.loadData();
}

/*
 * 家庭子女数=家庭男孩+家庭女孩
 */
function changeEventchildnum(e){
	var m = $("#tbfi_children_mnum").val().trim();
	var f = $("#tbfi_children_fnum").val().trim();
	if(m == ''){m = "0";$('#tbfi_children_mnum').val(0);}
	if(f == ''){f = "0";$('#tbfi_children_fnum').val(0);}
	if(!isNum(mnum, '+')){
		warningTip("男孩数：请输入正整数");
		return;
	}
	if(!isNum(fnum, '+')){
		warningTip("女孩数：请输入正整数");
		return;
	}
	$('#tbfi_children_num').val(parseInt(m) + parseInt(f))
}


/*
 * 胎数=新生男孩+新生女孩
 */
function changeEventnum(e){
	var reserve2 = $("#reserve2").val().trim();
	var reserve3 = $("#reserve3").val().trim();
	if(reserve2 == ''){reserve2 = "0";$('#reserve2').val(0);}
	if(reserve3 == ''){reserve3 = "0";$('#reserve3').val(0);}
	if(!isNum(reserve2, '+')){
		warningTip("新生男孩数：请输入正整数");
		return;
	}
	if(!isNum(reserve3, '+')){
		warningTip("新生女孩数：请输入正整数");
		return;
	}
	$('#tbenm_gravida_num').val(parseInt(reserve2) + parseInt(reserve3))
}

/*
*计算年龄
*/
function mathYear(){
  var tbe_work_area = $('#tbenm_birth_time').val();
  var pYear="";
  var d = new Date();
  var vYear = d.getFullYear();
  var vMon = d.getMonth() + 1;
  var vDay = d.getDate()
  var wYear= tbe_work_area.substring(0,4);
  var wMon=tbe_work_area.substring(5,7);
  var wDay=tbe_work_area.substring(8,10);
  if(wYear<vYear){
     if(wMon<=vMon){
       if(wDay<=vDay){
          pYear=vYear-wYear;
          }else{
           pYear=vYear-wYear-1;
         }
       }else{
       pYear=vYear-wYear-1;
     }
  }else if(wDay=vYear){
    pYear=0;
   }else{
     warningTip('出生时间有误');
     return;
  }
  $("#tbend_age").val(pYear);
}

function plantiems()//胎次
{
	var t = $("#tbenm_plan_status").val();
	$("#tbenm_gravida_times").val(parseInt(t)+1);
	check();
}

$(function ()
{
    $("#navtab1").ligerTab(); 
});
</script>
	</head>
	<body style="overflow: auto; overflow-x: hidden">
		<table id="aaa" class="serTable">
			<tr>
				<td>
					机构：
				</td>
				<td>
					<select id="org2" style="width: 164px;">
						<%=user.getCurSubOrgOptions()%>
					</select>
				</td>
				<td>
					职工姓名：
					<input id="ser1" style="width: 160px;" />
				</td>
				<td>
					身份证号：
					<input id="ser3" style="width: 160px;" />
				</td>
				<td>
					<input class="btn2" value="搜索" type="button" onclick="serch1();" />
				</td>
			</tr>
			<tr>
				<td>
					怀孕时间：
				</td>
				<td>
					<input id="ser2" onkeyup="this.value=formatdata(this.value);"
						style="width: 164px;" />
				</td>
				<td>
					计划状态：
					<select id="ser4" style="width: 164px;">
						<option value="2">
							全部
						</option>
						<option value="0">
							计划内一胎
						</option>
						<option value="1">
							计划内二胎
						</option>
					</select>
				</td>
				<td>
					晚婚+晚育：
					<select id="ser5" style="width: 164px;">
						<option value="2">
							全部
						</option>
						<option value="1">
							是
						</option>
						<option value="0">
							否
						</option>
					</select>
				</td>
				<td>
					<input class="btn2" value="导出" type="button" onclick="expData();" />
				</td>
			</tr>
		</table>

		<div id="emp-grid"></div>
		<div style="font-size: 15px; text-align: left; margin-top: 5px;">
			注:(1)等孕
			<input type="text" id="pregnancying" name="pregnancying"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;"
				ondblclick="showDetail('等孕',this.name)" />
			人, 怀孕
			<input type="text" id="pregnancyed" name="pregnancyed"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;"
				ondblclick="showDetail('怀孕',this.name)" />
			人, 共
			<input type="text" id="pregnancy" name="pregnancy"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;"
				ondblclick="showDetail('孕育',this.name)" />
			人.
		</div>
		<div
			style="font-size: 15px; text-align: left; margin-top: 5px; margin-left: 18px;">
			(2)出生婴儿
			<input type="text" id="plan"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;" />
			人, 计划内一胎
			<input type="text" id="plan1" value="0"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;" />
			人, 计划内二胎
			<input type="text" id="plan2" value="3"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;" />
			人, 其中晚婚+晚育
			<input type="text" id="late"
				style="border: 0; width: 60px; border-bottom: 1px solid #000; text-align: center;"
				value="0" />
			人。
		</div>
		<div id="empAdd-div" style="display: none;">
			<form id="emp-form" name="emp-form">
				<table class="form_table">
					<tr>
						<td colspan="9" align="left">
							<div
								style="border-bottom: 1px solid #EBEBEB; font-weight: bold; height: 28px; line-height: 28px; margin: 0 0 5px;">
								<img src="ligerUI/skins/icons/communication.gif" />
								<span>基础信息</span>
							</div>
						</td>
					</tr>
					<tr>
						<td class="form_label">
							机构：
						</td>
						<td>
							<select id="org_id" name="org_id"
								style="width: 182px; height: 22px">
								<%=user.getCurSubOrgOptions()%>
							</select>
						</td>
						<td>
							<font color="red">*</font>
						</td>
						<td class="form_label">
							姓名：
						</td>
						<td>
							<input class="textbg1" id="tbe_name" name="tbe_name" readonly="readonly" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td>
							<font color="red">*</font>
							<input id="empBtn" name="empBtn" type="button" class="btn1"
								value="选人" onclick="openEmp();" />
						</td>
					</tr>
					<tr>
						<td class="form_label">
							性别：
						</td>
						<td align="left" id="tbe_sex">
							<input style="margin-top: 2px;" type="radio" name="tbe_sex"
								value="男" checked="checked" />
							男
							<input style="margin-top: 2px;" type="radio" name="tbe_sex"
								value="女" />
							女
						</td>
						<td></td>
						<td class="form_label">
							身份证号：
						</td>
						<td>
							<input class="textbg1" id="tbe_idcard" name="tbe_idcard"
								readonly="readonly" onMouseOver="this.style.borderColor='#4fa8e6'"
								onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td></td>
					</tr>
					<tr>
						<td class="form_label">
							出生日期：
						</td>
						<td>
							<input id="tbe_birthday" name="tbe_birthday" readonly="readonly" />
						</td>
						<td></td>
						<td class="form_label">
							民族：
						</td>
						<td>
							<select id="tbe_nation" name="tbe_nation" style="width: 182px;">
								<%=tbe_nation%>
							</select>
						</td>
						<td></td>
					</tr>
					<tr style="display: none;">
						<td class="form_label">
							家庭id：
						</td>
						<td>
							<input class="textbg1" id="tbfi_ids" name="tbfi_ids" onMouseOver="this.style.borderColor='#4fa8e6'"
								onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td></td>
					</tr>
					<tr>
						<td colspan="9" align="left">
							<div
								style="border-bottom: 1px solid #EBEBEB; font-weight: bold; height: 28px; line-height: 28px; margin: 0 0 5px;">
								<img src="ligerUI/skins/icons/communication.gif" />
								<span>家庭信息</span>
							</div>
						</td>
					</tr>
					<tr>
						<td class="form_label">
							配偶姓名：
						</td>
						<td>
							<input class="textbg1" id="tbfi_peo_num" name="tbfi_peo_num" readonly="readonly"
								onMouseOver="this.style.borderColor='#4fa8e6'"
								onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td></td>
						<td class="form_label">
							家庭子女数：
						</td>
						<td>
							<input class="textbg1" id="tbfi_children_num"
								name="tbfi_children_num" readonly="readonly" value="0"
								onMouseOver="this.style.borderColor='#4fa8e6'"
								onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td></td>
					</tr>
					<tr>
						<td class="form_label">
							家庭电话：
						</td>
						<td>
							<input class="textbg1" id="tbfi_phone" name="tbfi_phone" readonly="readonly"
								onMouseOver="this.style.borderColor='#4fa8e6'"
								onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td></td>
						<td class="form_label">
							家庭地址：
						</td>
						<td>
							<input class="textbg1" id="tbfi_address" name="tbfi_address" readonly="readonly"
								onMouseOver="this.style.borderColor='#4fa8e6'"
								onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td></td>
					</tr>
					<tr>
						<td class="form_label">
							家庭男孩数：
						</td>
						<td>
							<input class="textbg1" id="tbfi_children_mnum"
								name="tbfi_children_mnum" value="0" onchange="changeEventchildnum(this);" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td>
							<font color="red">*</font>
						</td>
						<td class="form_label">
							家庭女孩数：
						</td>
						<td>
							<input class="textbg1" id="tbfi_children_fnum"
								name="tbfi_children_fnum" onchange="changeEventchildnum(this);" value="0" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" />
						</td>
						<td>
							<font color="red">*</font>
						</td>
					</tr>
					<tr>

					</tr>
					<tr>
						<td>
							<br />
						</td>
					</tr>
				</table>
			</form>
			<div id="navtab1"
				style="overflow: hidden; border: 1px solid #A3C0E8;">
				<div tabid="home" title="新增和注销怀孕登记">
					<div id="empAdd-div1">
						<form id="emp-form1" name="emp-form1">
							<input type="hidden" id="tbfi_id" name="tbfi_id" value="" />
							<input type="hidden" id="tbepr_id" name="tbepr_id" value="" />
							<input type="hidden" id="reserve1" name="reserve1" value="" />
							<input type="hidden" id="reserve5" name="reserve5" value="" />
							<input type="hidden" id="create_by" name="create_by" value="" />
							<input type="hidden" id="create_time" name="create_time" value="" />
							<input type="hidden" id="last_modify_by" name="last_modify_by"
								value="" />
							<input type="hidden" id="last_modify_time"
								name="last_modify_time" value="" />
							<table class="form_table">
								<tr>
									<td colspan="9" align="left">
										<div
											style="border-bottom: 1px solid #EBEBEB; font-weight: bold; height: 28px; line-height: 28px; margin: 0 0 5px;">
											<img src="ligerUI/skins/icons/communication.gif" />
											<span>怀(等)孕信息</span>
										</div>
									</td>
								</tr>
								<tr style="display: none;">
									<td class="form_label">
										机构：
									</td>
									<td>
										<select id="org_id" name="org_id" style="width: 182px;">
											<%=user.getCurSubOrgOptions()%>
										</select>
									</td>
									<td>
										<font color="red">*</font>
									</td>
								</tr>
								<tr>
									<td class="form_label">
										登记状态：
									</td>
									<td>
										<select id="tbepr_option" name="tbepr_option"
											style="width: 182px;">
											<option value="0">
												怀孕
											</option>
											<option value="1">
												等孕
											</option>
											<option value="2">
												无
											</option>
										</select>
									</td>
									<td>
										<font color="red">*</font>
									</td>
									<td class="form_label">
										怀等孕时间：
									</td>
									<td>
										<input id="tbepr_ptime" name="tbepr_ptime" onkeyup="this.value=formatdata(this.value);" />
									</td>
									<td>
										<font color="red">*</font>
									</td>
								</tr>
								<tr>
									<td class="form_label">
										备注：
									</td>
									<td>
										<input class="textbg1" id="tbepr_memo" name="tbepr_memo" onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
								</tr>
								<tr>
									<td>
										<br />
									</td>
								</tr>
							</table>
							<p style="padding-left: 7cm;">
								<input type="button" value="保存" id="pre1" class="btn2"
									onclick="precon();" />
								<input type="button" value="注销" id="pre2" class="btn2"
									onclick="precon(1);" />
								<input type="reset" value="重置" id="pre3" class="btn2" />
							</p>
						</form>
					</div>
				</div>
				<div title="新生儿登记及计划状态登记">
					<div id="empAdd-div2">
						<form id="emp-form2" name="emp-form2">
							<input type="hidden" id="tbfi_id" name="tbfi_id" value="" />
							<input type="hidden" id="tbe_id" name="tbe_id" value="" />
							<input type="hidden" id="tbenm_id" name="tbenm_id" value="" />
							<input type="hidden" id="reserve1" name="reserve1" value="" />
							<input type="hidden" id="reserve5" name="reserve5" value="" />
							<input type="hidden" id="create_by" name="create_by" value="" />
							<input type="hidden" id="create_time" name="create_time" value="" />
							<input type="hidden" id="last_modify_by" name="last_modify_by"
								value="" />
							<input type="hidden" id="last_modify_time"
								name="last_modify_time" value="" />
							<table class="form_table">
								<tr style="display: none;">
									<td class="form_label">
										机构：
									</td>
									<td>
										<select id="org_id" name="org_id" style="width: 182px;">
											<%=user.getCurSubOrgOptions()%>
										</select>
									</td>
									<td>
										<font color="red">*</font>
									</td>
								</tr>
								<tr>
									<td colspan="9" align="left">
										<div
											style="border-bottom: 1px solid #EBEBEB; font-weight: bold; height: 28px; line-height: 28px; margin: 0 0 5px;">
											<img src="ligerUI/skins/icons/communication.gif" />
											<span>新生儿信息</span>
										</div>
									</td>
								</tr>
								<tr style="display: none;">
									<td class="form_label">
										胎次：
									</td>
									<td>
										<input class="textbg1" id="tbenm_gravida_times"
											name="tbenm_gravida_times" value="1"
											onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
									<td class="form_label">
										年龄：
									</td>
									<td>
										<input class="textbg1" id="tbend_age" name="tbend_age"
											value="0" onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
								</tr>
								<tr style="display: none;">
									<td class="form_label">
										姓名：
									</td>
									<td>
										<input class="textbg1" id="tbend_name" name="tbend_name" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
									<td class="form_label">
										性别：
									</td>
									<td align="left" id="tbend_sex">
										<input style="margin-top: 2px;" type="radio" name="tbend_sex"
											value="0" checked="checked" />
										男
										<input style="margin-top: 2px;" type="radio" name="tbend_sex"
											value="1" />
										女
									</td>
									<td class="form_label">
										身份证号
									</td>
									<td>
										<input class="textbg1" id="tbend_idcard" name="tbend_idcard" onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
								</tr>
								<tr>
									<td class="form_label">
										计划状态：
									</td>
									<td>
										<select id="tbenm_plan_status" name="tbenm_plan_status"
											onchange="plantiems();" style="width: 182px;">
											<option value="0">
												计划内一胎
											</option>
											<option value="1">
												计划内二胎
											</option>
										</select>
									</td>
									<td>
										<font color="red">*</font>
									</td>
									<td class="form_label">
										胎数：
									</td>
									<td>
										<input class="textbg1" id="tbenm_gravida_num"
											name="tbenm_gravida_num" value="0" readonly="readonly"
											onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
								</tr>
								<tr>
									<td class="form_label">
										新生男孩数：
									</td>
									<td>
										<input class="textbg1" id="reserve2" name="reserve2"
											value="0" onchange="changeEventnum(this);"
											onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td>
										<font color="red">*</font>
									</td>
									<td class="form_label">
										新生女孩数：
									</td>
									<td>
										<input class="textbg1" id="reserve3" name="reserve3" value="0" onchange="changeEventnum(this);"
											onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td>
										<font color="red">*</font>
									</td>
								</tr>
								<tr>
									<td class="form_label">
										出生时间：
									</td>
									<td>
										<input id="tbenm_birth_time" name="tbenm_birth_time"
											onblur="mathYear();" onkeyup="this.value=formatdata(this.value);" />
									</td>
									<td>
										<font color="red">*</font>
									</td>
									<td class="form_label">
										备注：
									</td>
									<td>
										<input class="textbg1" id="tbenm_memo" name="tbenm_memo" onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td></td>
								</tr>
								<tr style="display: none;">
									<td class="form_label">
										家庭男孩数：
									</td>
									<td>
										<input class="textbg1" id="tbfi_children_mnums"
											name="tbfi_children_mnums" value="0"
											onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td>
										<font color="red">*</font>
									</td>
									<td class="form_label">
										家庭女孩数：
									</td>
									<td>
										<input class="textbg1" id="tbfi_children_fnums"
											name="tbfi_children_fnums" value="0"
											onMouseOver="this.style.borderColor='#4fa8e6'"
											onMouseOut="this.style.borderColor='#A1A3A1'" />
									</td>
									<td>
										<font color="red">*</font>
									</td>
								</tr>
								<tr>
									<td class="form_label">
										晚婚+晚育：
									</td>
									<td align="left" id="reserve4">
										<input style="margin-top: 2px;" type="radio" name="reserve4"
											value="1" onclick="javascript:check()" />
										是
										<input style="margin-top: 2px;" type="radio" name="reserve4"
											value="0" checked="checked" onclick="javascript:check()" />
										否
									</td>
									<td></td>
								</tr>
							</table>
							<p style="padding-left: 7cm;">
								<input type="button" value="保存" id="neo1" class="btn2"
									onclick="neofun();" />
								<input type="button" value="注销" id="neo2" class="btn2"
									onclick="neofun(1);" />
								<input type="reset" value="重置" id="neo3" class="btn2" />
							</p>
						</form>
					</div>
				</div>
			</div>
		</div>
		<div id="grid0-win" style="display: none;">
			<table class="serTable">
				<tr>
					<td>
						姓名：
					</td>
					<td>
						<input id="ser-name" style="width: 100px;" />
					</td>
					<td>
						身份证：
					</td>
					<td>
						<input id="ser-no" style="width: 150px;" />
					</td>
					<td>
						<input class="btn2" value="搜索" type="button" onclick="serch2();" />
					</td>
					<td>
						<input class="btn2" value="重置" type="button"
							onclick="serempReset();" />
					</td>
				</tr>
			</table>
			<div id="grid0-div"></div>
		</div>
		<div id="mdiv" style="display: none;">
			<div id="dgrid"></div>
		</div>
	</body>
</html>